package com.leps.nq.op.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leps.nq.common.vo.PageVo;
import com.leps.nq.op.entity.OpRetire;
import com.leps.nq.op.mapper.OpRetireMapper;
import com.leps.nq.op.service.IOpRetireService;
import com.leps.nq.op.vo.RetireQueryModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 失效记录表 服务实现类
 * </p>
 *
 * @author hex
 * @since 2022-05-22
 */
@Service
public class OpRetireServiceImpl extends ServiceImpl<OpRetireMapper, OpRetire> implements IOpRetireService {
    @Autowired
    OpRetireMapper retireMapper;

    @Override
    public PageVo<OpRetire> pageByQueryModel(RetireQueryModel queryModel) {
        Page<OpRetire> page = Page.of(queryModel.getPageNum(), queryModel.getPageSize());
        page = this.retireMapper.selectByQueryModel(page, queryModel);
        return PageVo.of(page);
    }
}
